package com.appcheck.recording.handler.action;

import org.json.JSONException;
import org.json.JSONObject;

import com.appcheck.recording.action.ActionConvert;
import com.appcheck.recording.plugin.AbstractActionConverter;
import com.appcheck.recording.utils.Logger;

public final class Point implements ActionConvert{
	private float x;
	private float y;
	
	public Point(){}
	
	public Point(float x, float y){
		this.x = x;
		this.y = y;
	}

	public final float getX() {
		return x;
	}

	public final float getY() {
		return y;
	}
	public final JSONObject toJSONObject(){
	    JSONObject localJSONObject = new JSONObject();
	    try {
			localJSONObject.put("x", (int)this.x);
		    localJSONObject.put("y", (int)this.y);
		} catch (JSONException e) {
			Logger.ERROR("JSONException", e);
		}
	    return localJSONObject;
	}

	@Override
	public void toTestCode(AbstractActionConverter actionConverter) {

	}
}
